package com.ellison.springdemo.springbase.mvc.controller;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;

import java.util.Properties;

/**
 * <p>TODO</p>
 *
 * @author Ellison_Pei
 * @date 2022/3/9 19:36
 * @since 1.0
 **/
@Configuration
public class SimpleUrlConfig {

    @Bean
    public SimpleUrlHandlerMapping simpleUrlHandlerMapping(){
        SimpleUrlHandlerMapping simpleUrlHandlerMapping = new SimpleUrlHandlerMapping();
        Properties properties = new Properties();
        properties.put("area/index", "areaController");
        simpleUrlHandlerMapping.setMappings(properties);
        return simpleUrlHandlerMapping;
    }
}
